import request from '@/utils/request'

// 查询参数列表
export function list(query) {
  return request({
    url: '/system/automation/list',
    method: 'get',
    params: query
  })
}

// 查询参数详细
export function get(id) {
  return request({
    url: '/system/automation/getDetails?id=' + id,
    method: 'get'
  })
}

// 新增参数配置
export function add(data) {
  return request({
    url: '/system/automation',
    method: 'post',
    data: data
  })
}

// 修改参数配置
export function update(data) {
  return request({
    url: '/system/automation',
    method: 'put',
    data: data
  })
}

// 删除参数配置
export function deleted(id) {
  return request({
    url: '/system/automation/' + id,
    method: 'delete'
  })
}
